package com.angel.resourceBundle.internationalizable.impl;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

import com.angel.resourceBundle.domain.Texto;
import com.angel.resourceBundle.internationalizable.Internationalizable;


/**
 * 
 *
 * @author William
 * @since 20/April/2009
 */
@Entity
@DiscriminatorValue(value = "TextInternationalizable")
public class TextInternationalizable extends Internationalizable {
	
	private static final long serialVersionUID = 2822338776268731342L;
	
	private Texto texto;

	public TextInternationalizable(){
		super();
	}
	
	public TextInternationalizable(Texto text){
		super();
		this.texto = text;
	}
	
	public TextInternationalizable(String text){
		super();
		this.texto = new Texto(text);
	}

	@Override
	public Object getOwner() {
		return this.texto;
	}

	@Override
	public void setOwner(Object owner) {
		this.texto = (Texto) owner;
	}

	@Override
	public String getText() {
		return this.texto.getTexto();
	}
}
